Skip to content

packets: Allow terminating packets of length 0 #516

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 16, 2016
Merged

Conversation

julienschmidt
Copy link
Member

Description

Fix for #514

The important change is that we now check if prevData == nil for packets with a payload length of 0. If the previous data is not empty, this packet is a terminating packet.

Also add unit tests, mc.readPacket() should now have 100% code coverage.

Checklist

  • Code compiles correctly
  • Created tests which fail without the change (if possible)
  • All tests passing

Copy link
Member

@methane methane left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@julienschmidt julienschmidt merged commit 665b834 into master Nov 16, 2016
@julienschmidt julienschmidt deleted the term-packets branch November 16, 2016 07:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants